Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.

fix: nested additional props cause data corruption#119

Open
VinzSpring wants to merge 1 commit into
eclipsesource:mainfrom
VinzSpring:patch-1
Open

fix: nested additional props cause data corruption#119
VinzSpring wants to merge 1 commit into
eclipsesource:mainfrom
VinzSpring:patch-1

Conversation

@VinzSpring

@VinzSpring VinzSpring commented Jan 31, 2025

Copy link
Copy Markdown

Fixed invalid path composition that causes nested additional properties to have invalid values.

An example that previously wouldn't have worked:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "SomeNestedConfig": {
      "type": "object",
      "default": {},
      "properties": {
        "CsvImportDirectory": {
          "type": ["string", "null"],
          "default": "import"
        },
        "KeyToValueMapping": {
          "type": "object",
          "patternProperties": {
            ".*": {
              "type": "string",
              "title": "Key"
            }
          },
          "additionalProperties": {
            "type": "string",
            "title": "Value"
          },
          "default": {}

        }
      },
      "required": ["CsvImportDirectory", "KeyToValueMapping"],
      "additionalProperties": true
    }
  },

  "required": [
    "SomeNestedConfig"
  ],
  "additionalProperties": true
}

Now it produces valid output.

Fixed invalid path composition that causes nested additional properties to have invalid values.
@CLAassistant

CLAassistant commented Jan 31, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@netlify

netlify Bot commented Jan 31, 2025

Copy link
Copy Markdown

Deploy Preview for jsonforms-vuetify-renderers failed.

Name Link
🔨 Latest commit 991855b
🔍 Latest deploy log https://app.netlify.com/sites/jsonforms-vuetify-renderers/deploys/679ce3f2671d060008b73c9f

@Yekt

Yekt commented Jan 31, 2025

Copy link
Copy Markdown

We stumbled across issues when trying to use "additionalProperties" in nested objects.
This fix resovled those problems.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants